package com.kaili.tms.export;

import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import com.kaili.tms.config.Tools;
import com.kaili.tms.pojo.entity.CostStatisticsDetailExport;
import com.kaili.tms.service.ExpenseAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * @Desc: 成本统计明细导出
 * @author: zengshuai
 * @Time: 19-2-13 下午3:27
 * @Copyright: © 2018 杭州凯立通信有限公司 版权所有
 * @Warning: 本内容仅限于公司内部传阅, 禁止外泄或用于其它商业目的
 */
@ExportNotice(name = "成本统计明细导出")
@Component
public class ExportCostStatisticsDetail extends BaseExport{

    @Autowired
    private ExpenseAccountService expenseAccountService;

    @Override
    public HashMap doExport(HashMap parm) {
        HashMap ret = new HashMap();
        ret.put(NormalExcelConstants.CLASS, CostStatisticsDetailExport.class);
        parm = (HashMap) Tools.trimHashMap(parm);
        List<CostStatisticsDetailExport> list = expenseAccountService.costStatisticsDetailExport(parm);

        ret.put(NormalExcelConstants.DATA_LIST, list);
        return ret;
    }
}
